package collection;

public class OrdTreeNode<E> extends ATreeNode<E> {

	private OrdTreeNode<E> parent;
	private SLinkedList<OrdTreeNode<E>> children;
	
	OrdTreeNode(E element)
	{
		super(element);
		this.children = new SLinkedList<OrdTreeNode<E>>();
	}
	
	OrdTreeNode<E> getParent()
	{
		return this.parent;
	}
	
	void setParent(OrdTreeNode<E> parent)
	{
		this.parent = parent;
	}
	
	SLinkedList<OrdTreeNode<E>> getChildren()
	{
		return this.children;
	}
	
	void setChildren(SLinkedList<OrdTreeNode<E>> children)
	{
		this.children = children;
	}
	
	void addChild(OrdTreeNode<E> child)
	{
		this.children.addLast(this.children.createNode(child));
	}
	
	@Override
	public void clear()
	{
		super.clear();
		this.children = null;
	}
	
}
